import axios from '@/libs/axios.js'
import baseUrl from './index'
let jsonHeaders = { 'content-type': 'application/json;charset=UTF-8' }

// 视频图片列表
export const getFilesData = (params, data) => {
    return axios({
        url: `${baseUrl}/minio/page/list?pageIndex=${params.pageIndex}&pageSize=${params.pageSize}`,//`${baseUrl}/ftp/filerecord/page`,
        method: 'post',
        data: data,
        headers: jsonHeaders,
    })
}
// 删除
export const delFile = (id) => {
    return axios({
        url: `${baseUrl}/minio/upload/file/${id}`,//`${baseUrl}/ftp/filerecord/${id}`,
        method: 'delete',
        headers: jsonHeaders,
    })
}

export const getFileInfos = (id) => {
    return axios({
        url: `${baseUrl}/minio/upload/file/${id}`,
        method: 'get',
        headers: jsonHeaders,
    })
}

//设置系统音效
export const setSound = (params,name) => {
    return axios({
        url: `${baseUrl}/dictionaries/sysConf/updateByName/${name}`,
        method: 'put',
        data: params,
        headers: jsonHeaders,
    })
}

//获取当前的系统音效
export const getSound = params => {
    return axios({
        url: `${baseUrl}/dictionaries/sysConf/getInfoByName`,
        method: 'get',
        params: params,
        headers: jsonHeaders
    })
}